﻿using System;
using System.Collections;

namespace CSharp.Libs.Koc
{
    public class LogEntryEventArgs : EventArgs
    {
        private DateTime _EntryDateTime;
        private String _LogMessage = "";

        public LogEntryEventArgs(
            String LogMessage)
        {
            _EntryDateTime = DateTime.Now;
            _LogMessage = LogMessage;
        }

        public LogEntryEventArgs(
            DateTime EntryDateTime,
            String LogMessage)
        {
            _EntryDateTime = EntryDateTime;
            _LogMessage = LogMessage;
        }

        public DateTime EntryDateTime
        {
            get
            {
                return _EntryDateTime;
            }
        }

        public String LogMessage
        {
            get
            {
                return _LogMessage;
            }
        }
    }



    public class TaskEventArgs : EventArgs
    {
        private enmTaskAction _taAction = enmTaskAction.tskActUndefined;
        private String _strTaskMessage = "";

        public enum enmTaskAction
        {
            tskActUndefined = 1,
            tskActStarted,
            tskActWorking,
            tstActStopped,
            tskActDone
        }

        public TaskEventArgs(
            enmTaskAction taAction,
            String strTaskMessage)
        {
            _taAction = taAction;
            _strTaskMessage = strTaskMessage;
        }

        public enmTaskAction TaskAction
        {
            get
            {
                return _taAction;
            }
            set
            {
                _taAction = value;
            }
        }

        public String TaskMessage
        {
            get
            {
                return _strTaskMessage;
            }
            set
            {
                _strTaskMessage = value;
            }
        }
    }



    public class ReloadServerEventArgs : EventArgs
    {
        private Int32 _intServerId = 0;

        public ReloadServerEventArgs(
            Int32 ServerId)
        {
            _intServerId = ServerId;
        }

        public Int32 ServerId
        {
            get
            {
                return _intServerId;
            }
        }
    }



    public class UpdateSeedReceivedEventArgs : EventArgs
    {
        private int _intServerNr = 0;
        private Hashtable _htUpdateSeed = null;

        public UpdateSeedReceivedEventArgs(
            int ServerNr,
            Hashtable UpdateSeed)
        {
            _htUpdateSeed = UpdateSeed;
        }

        public Hashtable UpdateSeed
        {
            get
            {
                return _htUpdateSeed;
            }
        }

        public int ServerNr
        {
            get
            {
                return _intServerNr;
            }
        }
    }



    public class ResultStringReceivedEventArgs : EventArgs
    {
        private String _strResult = "";

        public ResultStringReceivedEventArgs(
            String Result)
        {
            _strResult = Result;
        }

        public String Result
        {
            get
            {
                return _strResult;
            }
        }
    }



    public class DatabaseFileMessageEventArgs : EventArgs
    {
        private DateTime _EntryDateTime;
        private String _Message = "";

        public DatabaseFileMessageEventArgs(
            String Message)
        {
            _EntryDateTime = DateTime.Now;
            _Message = Message;
        }

        public DateTime EntryDateTime
        {
            get
            {
                return _EntryDateTime;
            }
        }

        public String Message
        {
            get
            {
                return _Message;
            }
        }
    }
}
